<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>文章标题_政府采购信息网</title>
    <meta name="description" content="描述">
    <meta name="keywords" content="关键词">
    <!-- <link rel="icon" href="">
    <link rel="shortcut icon" href=""> -->
    <link rel="stylesheet" href="/web/public/css/public.css">
    <link rel="stylesheet" href="/web/public/css/header.css">
    <link rel="stylesheet" href="/web/public/css/footer.css">
    <link rel="stylesheet" href="/web/public/css/article.css">
    <link rel="stylesheet" href="/web/public/css/audio.css">
    <link rel="stylesheet" href="/web/public/css/right.css">
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_2103922_29dsi13humk.css">
    <link rel="stylesheet" type="text/css" href="https://www.jq22.com/jquery/font-awesome.4.6.0.css">

    <script src="/web/lib/jquery-1.12.4.min.js"></script>
    <script src="/web/lib/jquery.qrcode.min.js"></script>
    <script src="/web/lib/pgwslideshow.js"></script>
    <script src="/web/public/public.js"></script>
    <script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
    <script src="/web/lib/audio.js"></script>
    <script>
        function closeSimpleView() {
            $('body').removeClass('simple-view');
        }
    </script>
    <script>
        $(function () {
            var timer = setInterval(function () {
                try{
                    if (returnCitySN) {
                        clearInterval(timer);
                        $.ajax({
                            url:ports.articleClickCount,
                            data:{
                                articleId:$('#main-content').data('articleId'),
                                ip:returnCitySN.cip
                            },
                            //设置跨域为true
                            crossDomain:true,
                            // 允许携带证书
                            xhrFields: {
                                withCredentials: true
                            },
                            success:function (res) {}
                        })
                    }
                }catch (err){
                    if(err.toString().search('returnCitySN is not defined')==-1)
                        console.log(err)
                };
            },100);
        })
    </script>
    <script>
        function scollToComment() {
            document.getElementById('fragment-comment').scrollIntoView({behavior: "smooth"});
        }
        function simpleRead() {
            $('body').addClass('simple-view');
        }
        $(function () {
            var articleId = $('#fragment-article-share-menu').data('articleId');
            var $btnCommentLi = $('#fragment-article-share-menu .menu-list>li.comment');
            var $btnCollectionLi = $('#fragment-article-share-menu .menu-list>li.collect');
            var $btnLikeLi = $('#fragment-article-share-menu .menu-list>li.like');
            var isCollect = false;
            var isLike = false;

            $.ajax({
                url:ports.articleLikeNums,
                data:{
                    articleId:articleId
                },
                success:function (res) {
                    console.log('查询文章收藏点赞数量',res);
                    if(res.status==200){
                        $btnCommentLi.find('span').text(res.data.commentCount);
                        $btnCollectionLi.find('span').text(res.data.collectionCount);
                        $btnLikeLi.find('span').text(res.data.likeCount);
                        isCollect = res.data.collection;
                        isLike = res.data.like;

                        if(isCollect){
                            $btnCollectionLi.addClass('active');
                        }
                        if(isLike){
                            $btnLikeLi.addClass('active');
                        }

                        $btnCollectionLi.click(function () {
                            if(!isCollect){
                                $.ajax({
                                    url:ports.articleCollect,
                                    data:{
                                        articleId:articleId
                                    },
                                    success:function (res1) {
                                        console.log('收藏文章',res1);
                                        if(res1.status==200){
                                            $btnCollectionLi.addClass('active');
                                            $btnCollectionLi.find('span').text(res1.data.collectionCount);
                                            isCollect = true;
                                        }
                                    }
                                })
                            }else {
                                $.ajax({
                                    url:ports.cancelArticleCollect,
                                    data:{
                                        articleId:articleId
                                    },
                                    success:function (res1) {
                                        console.log('取消收藏文章',res1);
                                        if(res1.status==200){
                                            $btnCollectionLi.removeClass('active');
                                            $btnCollectionLi.find('span').text(res1.data.collectionCount);
                                            isCollect = false;
                                        }
                                    }
                                })
                            }

                        });
                        $btnLikeLi.click(function () {

                            if(!isLike){
                                $.ajax({
                                    url:ports.articleLike,
                                    data:{
                                        articleId:articleId
                                    },
                                    success:function (res1) {
                                        console.log('点赞文章',res1);
                                        if(res1.status==200){
                                            $btnLikeLi.addClass('active');
                                            $btnLikeLi.find('span').text(res1.data.likeCount);
                                            isLike = true;
                                        }
                                    }
                                })
                            }else {
                                $.ajax({
                                    url:ports.cancelArticleLike,
                                    data:{
                                        articleId:articleId
                                    },
                                    success:function (res1) {
                                        console.log('取消点赞文章',res1);
                                        if(res1.status==200){
                                            $btnLikeLi.removeClass('active');
                                            $btnLikeLi.find('span').text(res1.data.likeCount);
                                            isLike = false;
                                        }
                                    }
                                })
                            }
                        });
                    }
                }
            })
        })

    </script>
    <script>
        //单个数字配零
        function getDouble(number){
            var numbers=["0","1","2","3","4","5","6","7","8","9"];
            for(var i=0;i<numbers.length;i++){
                if(numbers[i]==number){
                    return "0"+numbers[i];
                }else if(i==9){
                    return number;
                }

            }
        }
        //得到当天时间
        function getTodayTime(){
            var days=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
            var today=new Date();
            var str= (today.getYear()<1900?1900+today.getYear():today.getYear())+"年" + getDouble([today.getMonth()+1])+"月" +getDouble(today.getDate()) +"日 &nbsp;"+getDouble(today.getHours())+":"+getDouble(today.getMinutes())+":"+getDouble(today.getSeconds());
            document.getElementById('time').innerHTML=str;
        }
        //每隔一秒刷新一次
        setInterval("getTodayTime()",1000);
    </script>
</head>
<body>
<div class="container">
    <!--这里引入header-->
    <include file="/web/html/header/header.htm" page-type="1"></include>
    <div id="time" style="display: none"></div>
    <div id="simple-view-close" title="退出沉浸阅读" onclick="closeSimpleView()">
        <i class="iconfont icon-guanbi"></i>
    </div>
    <div id="main">
        <div class="position">
            <a href="javascript:" target="_blank" title="首页">首页</a> -
            <a href="javascript:" target="_blank" title="电梯频道">电梯频道</a>
        </div>
        <div id="share-menu-wrap">
            <include file="/web/html/fragment/article-share-menu.htm"></include>
        </div>
        <include file="/web/html/fragment/article-content.htm"></include>
        <include file="/web/html/fragment/special-ad.htm"></include>
        <include file="/web/html/fragment/comment.htm"></include>
        <aside class="right-area">
            <div class="control area-1">
                <include file="/web/html/fragment/promoter/character-card.htm"></include>
                <include file="/web/html/fragment/hot-search.htm"></include>
            </div>
            <div class="control area-2">
                <include file="/web/html/fragment/hot-special.htm"></include>
                <include file="/web/html/fragment/video-classroom.htm"></include>
            </div>
            <div class="control area-3">
                <include file="/web/html/fragment/excellent-books.htm"></include>
                <include file="/web/html/fragment/right-ad.htm"></include>
            </div>
        </aside>
    </div>
    <include file="/web/html/footer/footer.htm"></include>
</div>
</body>
</html>